home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / picfld10.zip / PICFIELD.DOC < prev    next >
Text File  |  1994-06-19  |  4KB  |  86 lines

  1. Picfield - Copyright (c) 1994, Loyd L Towe - All rights reserved.
  2.  
  3. Picfield works along the same lines as a POV-RAY height_field, but goes
  4. further.
  5.  
  6. Picfield takes as input a 320x200x256 color picture in either GIF or PCX
  7. format.  It translates the pictures Y coordinates into POV-RAY Z coordinates,
  8. with the top of the screen being away from you (ie: in the positive Z).  The
  9. pictures X coordinates are converted to POV-RAY X coordinates.  The POV-RAY
  10. Y coordinates are derived from the pictures color index.  Pixels with a
  11. color index of 0 are ignored and no object is created for the location.
  12.  
  13. Included in the archive are test files.  The PCX is set up to have 256 shades
  14. of gray of ascending value, which I find to be the most convenent way to work 
  15. out surfaces.
  16.  
  17. The utility has the following command line syntax:
  18.  
  19. (note: parameter order is important)
  20.  
  21.   picfield <infile> <outfile> <data format> <scale> [object name]
  22.  
  23. the infile is a 320x200x256 GIF or PCX picture file.  Pixel 159,99 translates
  24. into X=0 and Z=0.  Pixel 0,0 is X=-159 and Z=99.  In otherwords, the center
  25. of the screen is the center of POV-RAY world space.
  26.  
  27. the outfile can be named anything you desire.  Using .inc as the suffix seems
  28. logical.
  29.  
  30. the data formats are as follows:
  31.  
  32.   T = Generate the object array as triangles  (standard height_field method)
  33.   S = Generate output as unit sized spheres
  34.   R = Generate output as RAW data for futher processing
  35.   L = Make blob components (strength 1.0 radius 1.0)
  36.   W = Generate cylindrical wire mesh
  37.   B = Make box columns (from <x,0,y> to <x,index,y>
  38.   X = Make unit sized boxes
  39.   C = Generate cylinder columns
  40.   I = Generate unit sized cylinders
  41.   O = Use supplied object name
  42.  
  43. The scale factor is a integer value of 1 or greater (default value is 1).
  44. The useable range is 1..255 although values larger are allowed and can
  45. sometimes be useful.  The scaling is done by taking the color value and
  46. dividing it by 255, and the multiplying it by the scale factor.  Example:
  47. pixel 100,100 has a color index value of 127, the height for a scale factor
  48. of 1 would be 0.5, for a scale factor of 2 it would be 1.0, etc..
  49.  
  50. object name is the name of a declared object or an object from shapes.inc,
  51. and need only be added as a parameter if the 'O' option is used.
  52.  
  53. A word about size.  This program can generate data to choke a horse.  Care
  54. should be taken when creating a Picfield object set.  Create your pictures
  55. so that when the X size is multiplied by the Y size, the number is less than
  56. about 10,000 (or you'll be sorry :).  I have yet to use more than say 30x30
  57. and found that plenty of room to work.  Of course you make the picture
  58. larger if the pixels are sparse, and it contains lots of black.
  59.  
  60. That's it.  Have fun.  Picfield is being released as donation-ware.  You
  61. may use it freely to create object data to your hearts content.  I reserve
  62. all rights to the program, and its functionality.  If you would like to make
  63. a donation to the cause and support/encourage the development of additional 
  64. toys and utilities, send whatever (cash, check, scenes you have made with 
  65. Picfield, etc.) to:
  66.  
  67. Loyd L Towe
  68. c/o Data Wave
  69. 13500 SW Pacific Hwy #457
  70. Portland, Oregon 97223
  71.  
  72. I can be reached at:
  73.  
  74. Compuserve: 70614,1721
  75. internet: towel@elcsci.com
  76.  
  77.  
  78. plans for improvement:
  79.  
  80. add scaling for X and Z values
  81. add Y value offset factor
  82. auto palette generator
  83. built in drawing tools
  84.  
  85. whatever anyone else comes up with.
  86.